<template>
  <div class="block">
    <el-carousel height="150px">
      <el-carousel-item v-for="banner in sBanners">
        <a :href="banner.link">
          <img :src="banner.image" style="width: 100%;height: auto" @load="imageLoad">
        </a>
      </el-carousel-item>
    </el-carousel>
  </div>

</template>

<script>
  export default {
    name: "Swiper",
    data(){
      return {
        isLoad:false
      }
    },
    props:{
      sBanners:Array
    },
    methods:{
      imageLoad(){
        if(!this.isLoad){
          this.$emit('imgIsLoad');
          // console.log('====')
          this.isLoad=true
        }
      }
    }
  }
</script>

<style scoped>

</style>
